package com.pgybook.db.entity.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class FreePeriodEx {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public FreePeriodEx() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andFreeperiodidIsNull() {
            addCriterion("FREEPERIODID is null");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidIsNotNull() {
            addCriterion("FREEPERIODID is not null");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidEqualTo(Long value) {
            addCriterion("FREEPERIODID =", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidNotEqualTo(Long value) {
            addCriterion("FREEPERIODID <>", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidGreaterThan(Long value) {
            addCriterion("FREEPERIODID >", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidGreaterThanOrEqualTo(Long value) {
            addCriterion("FREEPERIODID >=", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidLessThan(Long value) {
            addCriterion("FREEPERIODID <", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidLessThanOrEqualTo(Long value) {
            addCriterion("FREEPERIODID <=", value, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidIn(List<Long> values) {
            addCriterion("FREEPERIODID in", values, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidNotIn(List<Long> values) {
            addCriterion("FREEPERIODID not in", values, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidBetween(Long value1, Long value2) {
            addCriterion("FREEPERIODID between", value1, value2, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andFreeperiodidNotBetween(Long value1, Long value2) {
            addCriterion("FREEPERIODID not between", value1, value2, "freeperiodid");
            return (Criteria) this;
        }

        public Criteria andTitleIsNull() {
            addCriterion("TITLE is null");
            return (Criteria) this;
        }

        public Criteria andTitleIsNotNull() {
            addCriterion("TITLE is not null");
            return (Criteria) this;
        }

        public Criteria andTitleEqualTo(String value) {
            addCriterion("TITLE =", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("TITLE <>", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThan(String value) {
            addCriterion("TITLE >", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("TITLE >=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThan(String value) {
            addCriterion("TITLE <", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("TITLE <=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLike(String value) {
            addCriterion("TITLE like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotLike(String value) {
            addCriterion("TITLE not like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleIn(List<String> values) {
            addCriterion("TITLE in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("TITLE not in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("TITLE between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("TITLE not between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNull() {
            addCriterion("STARTTIME is null");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNotNull() {
            addCriterion("STARTTIME is not null");
            return (Criteria) this;
        }

        public Criteria andStarttimeEqualTo(Date value) {
            addCriterion("STARTTIME =", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotEqualTo(Date value) {
            addCriterion("STARTTIME <>", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThan(Date value) {
            addCriterion("STARTTIME >", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("STARTTIME >=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThan(Date value) {
            addCriterion("STARTTIME <", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThanOrEqualTo(Date value) {
            addCriterion("STARTTIME <=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeIn(List<Date> values) {
            addCriterion("STARTTIME in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotIn(List<Date> values) {
            addCriterion("STARTTIME not in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeBetween(Date value1, Date value2) {
            addCriterion("STARTTIME between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotBetween(Date value1, Date value2) {
            addCriterion("STARTTIME not between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNull() {
            addCriterion("ENDTIME is null");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNotNull() {
            addCriterion("ENDTIME is not null");
            return (Criteria) this;
        }

        public Criteria andEndtimeEqualTo(Date value) {
            addCriterion("ENDTIME =", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotEqualTo(Date value) {
            addCriterion("ENDTIME <>", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThan(Date value) {
            addCriterion("ENDTIME >", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThanOrEqualTo(Date value) {
            addCriterion("ENDTIME >=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThan(Date value) {
            addCriterion("ENDTIME <", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThanOrEqualTo(Date value) {
            addCriterion("ENDTIME <=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIn(List<Date> values) {
            addCriterion("ENDTIME in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotIn(List<Date> values) {
            addCriterion("ENDTIME not in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeBetween(Date value1, Date value2) {
            addCriterion("ENDTIME between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotBetween(Date value1, Date value2) {
            addCriterion("ENDTIME not between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumIsNull() {
            addCriterion("PROCESSEDORDERNUM is null");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumIsNotNull() {
            addCriterion("PROCESSEDORDERNUM is not null");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumEqualTo(Integer value) {
            addCriterion("PROCESSEDORDERNUM =", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumNotEqualTo(Integer value) {
            addCriterion("PROCESSEDORDERNUM <>", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumGreaterThan(Integer value) {
            addCriterion("PROCESSEDORDERNUM >", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumGreaterThanOrEqualTo(Integer value) {
            addCriterion("PROCESSEDORDERNUM >=", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumLessThan(Integer value) {
            addCriterion("PROCESSEDORDERNUM <", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumLessThanOrEqualTo(Integer value) {
            addCriterion("PROCESSEDORDERNUM <=", value, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumIn(List<Integer> values) {
            addCriterion("PROCESSEDORDERNUM in", values, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumNotIn(List<Integer> values) {
            addCriterion("PROCESSEDORDERNUM not in", values, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumBetween(Integer value1, Integer value2) {
            addCriterion("PROCESSEDORDERNUM between", value1, value2, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andProcessedordernumNotBetween(Integer value1, Integer value2) {
            addCriterion("PROCESSEDORDERNUM not between", value1, value2, "processedordernum");
            return (Criteria) this;
        }

        public Criteria andLatestorderidIsNull() {
            addCriterion("LATESTORDERID is null");
            return (Criteria) this;
        }

        public Criteria andLatestorderidIsNotNull() {
            addCriterion("LATESTORDERID is not null");
            return (Criteria) this;
        }

        public Criteria andLatestorderidEqualTo(Long value) {
            addCriterion("LATESTORDERID =", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidNotEqualTo(Long value) {
            addCriterion("LATESTORDERID <>", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidGreaterThan(Long value) {
            addCriterion("LATESTORDERID >", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidGreaterThanOrEqualTo(Long value) {
            addCriterion("LATESTORDERID >=", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidLessThan(Long value) {
            addCriterion("LATESTORDERID <", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidLessThanOrEqualTo(Long value) {
            addCriterion("LATESTORDERID <=", value, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidIn(List<Long> values) {
            addCriterion("LATESTORDERID in", values, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidNotIn(List<Long> values) {
            addCriterion("LATESTORDERID not in", values, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidBetween(Long value1, Long value2) {
            addCriterion("LATESTORDERID between", value1, value2, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andLatestorderidNotBetween(Long value1, Long value2) {
            addCriterion("LATESTORDERID not between", value1, value2, "latestorderid");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumIsNull() {
            addCriterion("PROCESSEDBOOKNUM is null");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumIsNotNull() {
            addCriterion("PROCESSEDBOOKNUM is not null");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumEqualTo(Long value) {
            addCriterion("PROCESSEDBOOKNUM =", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumNotEqualTo(Long value) {
            addCriterion("PROCESSEDBOOKNUM <>", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumGreaterThan(Long value) {
            addCriterion("PROCESSEDBOOKNUM >", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumGreaterThanOrEqualTo(Long value) {
            addCriterion("PROCESSEDBOOKNUM >=", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumLessThan(Long value) {
            addCriterion("PROCESSEDBOOKNUM <", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumLessThanOrEqualTo(Long value) {
            addCriterion("PROCESSEDBOOKNUM <=", value, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumIn(List<Long> values) {
            addCriterion("PROCESSEDBOOKNUM in", values, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumNotIn(List<Long> values) {
            addCriterion("PROCESSEDBOOKNUM not in", values, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumBetween(Long value1, Long value2) {
            addCriterion("PROCESSEDBOOKNUM between", value1, value2, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andProcessedbooknumNotBetween(Long value1, Long value2) {
            addCriterion("PROCESSEDBOOKNUM not between", value1, value2, "processedbooknum");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidIsNull() {
            addCriterion("LASTESTBOOKINORDERID is null");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidIsNotNull() {
            addCriterion("LASTESTBOOKINORDERID is not null");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidEqualTo(Long value) {
            addCriterion("LASTESTBOOKINORDERID =", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidNotEqualTo(Long value) {
            addCriterion("LASTESTBOOKINORDERID <>", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidGreaterThan(Long value) {
            addCriterion("LASTESTBOOKINORDERID >", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidGreaterThanOrEqualTo(Long value) {
            addCriterion("LASTESTBOOKINORDERID >=", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidLessThan(Long value) {
            addCriterion("LASTESTBOOKINORDERID <", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidLessThanOrEqualTo(Long value) {
            addCriterion("LASTESTBOOKINORDERID <=", value, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidIn(List<Long> values) {
            addCriterion("LASTESTBOOKINORDERID in", values, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidNotIn(List<Long> values) {
            addCriterion("LASTESTBOOKINORDERID not in", values, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidBetween(Long value1, Long value2) {
            addCriterion("LASTESTBOOKINORDERID between", value1, value2, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andLastestbookinorderidNotBetween(Long value1, Long value2) {
            addCriterion("LASTESTBOOKINORDERID not between", value1, value2, "lastestbookinorderid");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIsNull() {
            addCriterion("UPDATETIME is null");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIsNotNull() {
            addCriterion("UPDATETIME is not null");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeEqualTo(Date value) {
            addCriterionForJDBCDate("UPDATETIME =", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("UPDATETIME <>", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeGreaterThan(Date value) {
            addCriterionForJDBCDate("UPDATETIME >", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("UPDATETIME >=", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeLessThan(Date value) {
            addCriterionForJDBCDate("UPDATETIME <", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("UPDATETIME <=", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIn(List<Date> values) {
            addCriterionForJDBCDate("UPDATETIME in", values, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("UPDATETIME not in", values, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("UPDATETIME between", value1, value2, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("UPDATETIME not between", value1, value2, "updatetime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}